package cn.gson.crm.model.dao;

import java.util.List;

public class PageDao<T> {
	private int pageCurren;	//当前页
	private int pageSize;	//页大小
	private int totalPage;	//总页数
	private int count;		//总记录数

	private String url;//请求路径和参数，例如：/GoodsAction?method=selectGoodsXXX&goodsid=1&pc=2
	private List<T> beanList;
	

	public int getPageCurren() {
		return pageCurren;
	}
	public void setPageCurren(int pageCurren) {
		this.pageCurren = pageCurren;
	}
	public int getPageSize() {
		return pageSize;
	}
	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}
	public int getTotalPage() {
		return totalPage;
	}
	public void setTotalPage(int totalPage) {
		this.totalPage = count % pageSize == 0 ? count / pageSize : count / pageSize + 1;
	}
	public int getCount() {
		return count;
	}
	public void setCount(int count) {
		this.count = count;
	}
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	public List<T> getBeanList() {
		return beanList;
	}
	public void setBeanList(List<T> beanList) {
		this.beanList = beanList;
	}
	
	public PageDao() {}
	
	public PageDao(int pageCurren, int pageSize, int totalPage, int count, String url, List<T> beanList) {
		super();
		this.pageCurren = pageCurren;
		this.pageSize = pageSize;
		this.totalPage = totalPage;
		this.count = count;
		this.url = url;
		this.beanList = beanList;
	}
	
	
}
